package com.aegis.manage.mapper;

import com.aegis.common.mybatis.mapper.WxBaseMapper;
import com.aegis.manage.api.dto.QueryAppInfoPageDTO;
import com.aegis.manage.api.dto.SysApiPermissionDTO;
import com.aegis.manage.api.vo.AppDetailVO;
import com.aegis.manage.api.vo.AppGroupVO;
import com.aegis.manage.api.vo.AppInfoVO;
import com.aegis.manage.model.dos.AuthApp;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author wuweixin
 *
 * @Version 1.0
 * @Descritube
 */
public interface AuthAppMapper extends WxBaseMapper<AuthApp> {

    /**
     * @param appId
     * @return
     */
    List<SysApiPermissionDTO> selectAppApiPermissions(@Param("appId") String appId);

    /**
     * @param appId
     * @return
     */
    List<SysApiPermissionDTO> selectAppApiGroupPermissions(@Param("appId") String appId);


    /**
     * @param page
     * @param queryAppInfoPageDTO
     * @return
     */
    IPage<AppInfoVO> queryAppInfoPage(IPage<AppInfoVO> page,
                                      @Param("dto") QueryAppInfoPageDTO queryAppInfoPageDTO);

    /**
     * @param id
     * @return
     */
    AppDetailVO selectAppDetailById(@Param("id") String id);

    /**
     * @param page
     * @param sysAppId
     * @return
     */
    IPage<AppGroupVO> queryAppGroupPage(IPage<AppInfoVO> page,
                                        @Param("sysAppId") String sysAppId,
                                        @Param("keywords") String keywords);

}
